﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using A2Z.BusinessObjects;
using KYO.DAL;
using BusinessLayerHelper;

public partial class Modules_Mod_Information_Informations : System.Web.UI.UserControl, IView<PersistentList<Information>>
{
    //List<NewInforShort> listNewInforShort;

    //public List<NewInforShort> ListNewInforShort
    //{
    //    //get { return listNewInforShort; }
    //    set
    //    {
    //        listNewInforShort = value;
    //        //Repeater1.DataSource = listNewInforShort;
    //        //Repeater1.DataBind();

    //    }
    //}
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected override void OnInit(EventArgs e)
    {
        CollectionPager1.MaxPages = 40;
        CollectionPager1.PageSize = 8;
        base.OnInit(e);
    }
    public string DoView(string InformationId)
    {
        int tabId = UrlRequestHandler.GetTabId();
        return "Default.aspx?tabId="+tabId +  "&inforId=" + InformationId;
        //return string.Empty;
    }


    #region IView<PersistentList<Information>> Members

    public void UpdateView(PersistentList<Information> o)
    {
        //Set DataSource of Pager to Sample Data
        CollectionPager1.DataSource = o;
        // CollectionPager1.co


        //Let the Pager know what Control it needs to DataBind during the PreRender	
        CollectionPager1.BindToControl = Repeater1;

        //Set the DataSource of the Repeater to the PagedData coming from the Pager.
        Repeater1.DataSource = CollectionPager1.DataSourcePaged;
    }

    public PersistentList<Information> UpdateModel(PersistentList<Information> o)
    {
        throw new NotImplementedException();
    }

    #endregion
}
